package name.ekr.assetguide;

import java.math.BigDecimal;
import java.math.RoundingMode;

public class Math {
    public static double roundTo4OrderDigits(double value) {
        return new BigDecimal(value).setScale(4, RoundingMode.HALF_EVEN).doubleValue();
    }

    public static double sum(double... args) {
        double sum = 0;

        for(double arg: args)
            sum += arg;

        return sum;
    }
}
